<html>
<head>
	<meta charset="UTF-8">
	<title>InputFilter</title>
	<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
	<script src="http://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
	<script src="./js/input-filter.js"></script>
</head>
<body>
<div class="col-md-offset-4 col-md-4">
	<input id="filter" type="text" class="form-control">
</div>
<script>
	(function(){
/*		var doc=document;
		function eventHandler(event){
			var event=event||window.event;
			value=this.value;
			if (!/^[1-9]\d*$/.test(value)&&value!=="") {
				this.value = value.replace(/[^\d]+/g, "");
				console.info("good");
				return false;
			}
			console.info("good");
		}

		var target=doc.getElementById("filter");
        target.attachEvent("onpropertychange", function(event) {
            return eventHandler.call(target,event);
        });*/
		var count=0;
		$("#filter").inputFilter({
			type:"alnum",
			transform:"uppercase",
			//max:1000,
			length:10,
			valueChange:function(element,value){
				console.info(value);
			}
		});
	}());
</script>
</body>
</html>